package com.xcc.mcp.server.tool;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

@Component
public class DataTool {

    @Tool(description = "获取当前时间")
    public String getCurrentTime() {
        System.out.println("调用 MCP 工具 getCurrentTime");
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
    }
}
